package view.manager
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;

	public class GlobalEventDispatcher extends EventDispatcher
	{
		[Event(name="CHANGE_WORK_STATUS", type="com.yuga.events.EleOperationEvent")]
		
		[Bindable]
		public var workState:String;
		
		private static var _instance : GlobalEventDispatcher;
		
		public function GlobalEventDispatcher(target:IEventDispatcher=null)
		{
			super(target);
		}
		
		public static function getInstance() : GlobalEventDispatcher
		{
			if ( _instance == null )
			{
				 _instance = new GlobalEventDispatcher();
			}
			return _instance;
		}
		
		public static function addEventListener(type:String, listener:Function):void
		{
			getInstance().addEventListener( type, listener );
		}
		
		public static function dispatchEvent( evt:Event ):void
		{
			getInstance().dispatchEvent( evt );
		}
	}
}